

<%= form_for @changeset, @action, fn f -> %>
  <%= if @changeset.action do %>
    <div class="alert alert-danger">
      <p>Oops, something went wrong! Please check the errors below.</p>
    </div>
  <% end %>

  <div class="form-group">
    <%= label f, :ist_id, class: "control-label" %>
    <%= text_input f, :ist_id, class: "form-control" %>
    <%= error_tag f, :ist_id %>
  </div>
 
  <div class="form-group">
    <%= label f, :stock_code, class: "control-label" %>
    <%= text_input f, :stock_code, class: "form-control", onblur: "_get_stockname()" %>
    <%= error_tag f, :stock_code %>
  </div>
  
  <div class="form-group">
    <%= label f, :stock_name, class: "control-label" %>
    <%= text_input f, :stock_name, class: "form-control" %>
    <%= error_tag f, :stock_name %>
  </div>
 
  <div class="form-group">
    <%= label f, :qty, class: "control-label" %>
    <%= number_input f, :qty, step: "any", class: "form-control" %>
    <%= error_tag f, :qty %>
  </div>
  
  <div class="form-group">
    <%= label f, :i_qty, class: "control-label" %>
    <%= number_input f, :i_qty, step: "any", class: "form-control" %>
    <%= error_tag f, :i_qty %>
  </div>
  
  <div class="form-group">
    <%= label f, :i_qty2, class: "control-label" %>
    <%= number_input f, :i_qty2, step: "any", class: "form-control" %>
    <%= error_tag f, :i_qty2 %>
  </div>
  
  <div class="form-group">
    <%= label f, :i_qty3, class: "control-label" %>
    <%= number_input f, :i_qty3, step: "any", class: "form-control" %>
    <%= error_tag f, :i_qty3 %>
  </div>

  <div class="form-group">
    <%= label f, :price, class: "control-label" %>
    <%= number_input f, :price, step: "any", class: "form-control" %>
    <%= error_tag f, :price %>
  </div>

  <div class="form-group">
    <%= submit "Submit", class: "btn btn-primary" %>
  </div>
<% end %>
